// Copyright 2024 Administrator
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * 歌曲类型
 */
export interface Song {
  //歌手列表
  artist: Artist[];
  //23
  cpId: number;
  pic: string;
  //歌曲标题
  title: string;
  //歌曲时长
  duration: number;
  //歌曲唯一code（"T10052891371"）
  assetId: string;
  //类别下面的子类别(摇滚-朋克)
  genre: string;
  //专辑的标题
  albumTitle: string;
  //歌曲唯一id（"T10052891371"）
  id: number;
  //语言（中文）
  lang: string;
  //0
  afReplayGain: number;
  //此歌曲专辑的唯一code（P10003119338）
  albumAssetCode: string;
  //发行时间
  releaseDate: string;
  trail_audio_info: TrailAudioInfo;
  //'CN-Z79-19-00189'
  isrc: string;
  //排序
  sort: number;
  //最小音量
  meanVolume: number;
  //最大音量
  maxVolume: number;
  //歌词链接(https://img01.dmhmusic.com/0208/M00/FD/50/ChR47F3bpFyAX5VYABs_kRz7EgM751.jpg)
  lyric: string;

  pay_model: number;
  //17090745
  _trackId: number;
  //歌曲唯一code（"T10052891371"）
  TSID: string;
  //歌曲所有的播放质量类型
  allRate: string[];
  //上架时间
  pushTime: string;
  //下架时间
  downTime: string;
  //sdk_cpm
  bizList: string[];
  //歌曲资源的类型（标准|高质|等）
  rateFileInfo: { [key: string]: RateFileInfo };
  //登录用户是否喜欢
  isFavorite: number;
  //是否是VIP歌曲
  isVip: number;
  //当前登录用户是否购买过
  isPaid: number;

  //歌曲MV
  video?: Video;
}

export interface Artist {
  artistCode: string;
  birthday: string;
  gender: string;
  name: string;
  artistType: number;
  artistTypeName: string;
  pic: string;
  region: string;
}

export interface RateFileInfo {
  //资源的size大小
  size: number;
  //资源的格式
  format: string;
}

export interface TrailAudioInfo {
  duration: string;
  start_time: string;
  path: string;
  rate: number;
  expireTime: number;
}

export interface Video {
  assetCode: string;
  artist: Artist[];
  introduce: string;
  langCode: string;
  genreName: string;
  upc: string;
  trackAssetCode: string[];
  originalReleaseDate: string;
  pic: string;
  title: string;
  type: number;
  resolution: string[];
  indexDataAddTime: string;
  genre: string;
}

export interface Artist {
  artistCode: string;
  gender: string;
  name: string;
  artistType: number;
  artistTypeName: string;
  pic: string;
  region: string;
}
